<?php
/* @var $this CategroryController */
/* @var $model Categrory */

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#categrory-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>



<div class="speedbar">
    <div class="speedbar-content">

        <ul class="menu-drop">
            <li><a href="#"><i class="icon-chevron-down"></i></a>
                <ul>
                    <li><a href="<?php echo Yii::app()->createUrl('admin/main/login'); ?>">Quản lý chung</a></li>
                </ul>  
            </li>
        </ul>

        <ul class="menu-speedbar">
            <li><a href="<?php echo Yii::app()->createUrl('admin/categrory/admin'); ?>" class="act_link">Quản lý danh mục</a></li>
            <li><a href="<?php echo Yii::app()->createUrl('admin/categrory/create'); ?>">Tạo danh mục mới</a></li>
        </ul>
    </div>
</div>

<?php
$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'categrory-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
        'cat_id',
        'slug',
        'cat_name',
        array(
            'class' => 'CButtonColumn',
        ),
    ),
));
?>
